fix(desktop): stop shipping demo content as TaskComposer initial values#349
Merged
Conversation
The composer seeded React state with a fake task and hardcoded paths, so a freshly launched app showed pre-filled demo content and never surfaced the textarea placeholder. Default all three fields to empty, add placeholders to the workspace/URL inputs, and gate the run button + submit on a `canRun` guard (task and workspace both non-empty) so the now-empty workspace default can't launch an invalid run. Closes #347 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
代码评审报告: fix(desktop): stop shipping demo content as TaskComposer initial values风险等级: 中 级联分析
问题发现模型未返回可结构化的问题发现;已提取可用的决策字段,原始非契约内容未附在评论中。 行级发现
Karpathy 评审
缺失覆盖
|
This was referenced Jun 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked Issue Or Context
Closes #347
Summary
TaskComposerseeded its React state with hardcoded demo content (a fake task为登录页添加深色模式切换plus~/projects/login-page/http://localhost:5173), so a freshly launched desktop app greeted users with pre-filled fake content and the textarea's placeholder never showed. This is the same class of leftover as the #344 footer cleanup, missed in the composer.Changes (single file,
apps/desktop/src/renderer/components/TaskComposer.tsx):task,workspacePath,browserUrlto empty strings so placeholders show on first launch.~/projects/your-app) and URL (http://localhost:5173(可选)) inputs, which previously had none.canRunguard (task and workspace both non-empty) used by bothsubmit()and the run button'sdisabledstate, so the now-empty workspace default cannot launch an invalid run.browserUrlstays optional.Impact Scope
Renderer-only, leaf component. No store, IPC, or contract changes.
GitNexus Impact Summary
detect_changes→ changed symbolsTaskComposer+submit(same file), 1 affected processApp → Submit(steps 2–3) — exactly the expected scope.impact(TaskComposer, upstream)→ LOW, 1 direct caller (App), 1 process, 1 module (Components).Verification
pnpm --filter @frontagent/desktop typecheck— clean.pnpm --filter @frontagent/desktop test— 13 files, 96 tests passing.biome checkon the file — clean (formatted).pnpm quality:precommitran via pre-commit hook — lint shows only the pre-existinguseTemplateinfo inhallucination-guard(unrelated), typecheck/test green.Note on tests:
apps/desktopfollows an established no-DOM-test architecture (logic lives in the store layer; components are not unit-tested). Per the repo-guard issue note, the verification intent (empty initial values + placeholders) is covered by the typecheck + the contained diff rather than a new component test, to avoid breaking that convention. Happy to add a lightweight render assertion if maintainers prefer.Checklist
pnpm quality:precommit, or explained why it could not run.pnpm quality:localfor critical skeleton changes, or explained why it could not run. — N/A, not a critical skeleton change.🤖 Generated with Claude Code